import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/Home.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/Home'
    },
    {
     
    
      path: '/Home',
      name: 'home',
      component: HomeView,
      children:[
      {
        path: 'SysUserTable',
        name: 'SysUserTable',
        component: () => import('../views/TabViews/SysUserTable.vue')//慢加载
      },
      {
        path: 'ProductAttributeCategoryTable',
        name: 'ProductAttributeCategoryTable',
        component: () => import('../views/TabViews/ProductAttributeCategoryTable.vue')//慢加载
      }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('../views/Login.vue')//慢加载
    }
    ,
    {
      path: '/register',
      name: 'Register',
      component: () => import('../views/Register.vue')//慢加载
    }
  ]
})

export default router
